Use ContextIdFactory.create() to generate a custom context ID, then call moduleRef.registerRequestByContextId() to bind a synthetic request object to it. Resolve the REQUEST-scoped provider using that context ID so it receives the synthetic request instead of a real HTTP request.
Queue processors and scheduled jobs have no HTTP request, but you may still need REQUEST-scoped providers for per-job isolation (e.g., tenant context per job). The solution is to synthetically create a request-like context for each job execution.
Bull/BullMQ queue processors — per-job tenant isolation.
CRON jobs — inject job-specific metadata as a request-like context.
CLI commands — simulate a request context for command handlers.
Any non-HTTP execution context that needs REQUEST-scoped provider isolation.